package jd.se.home;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author SunJiahao
 * @date 2021-05-22 16:20
 */
@Mapper
public interface HomeDao {
    @Select("select u_id, u_name, avatar from user where u_id = #{userid}")
    User findUserById(String userid);

    @Update("update user set avatar = #{avatar} where u_id = #{userid}")
    void updateAvatar(@Param("userid") String userId, @Param("avatar") String filename);

}